﻿using System;
using System.Collections.Generic;

namespace OhioState.Graphics
{
    public static class TextureExtensions
    {
        public static bool FormatsEqual(this ITexture texture, ITexture textureToCompare)
        {
            if (textureToCompare == null)
                return false;
            if (texture.Width != textureToCompare.Width)
                return false;
            if (texture.Height != textureToCompare.Height)
                return false;
            if (texture.Depth != textureToCompare.Depth)
                return false;
            if (texture.TexelType.Equals(textureToCompare.TexelType))
                return false;
            return true;
        }
        public static bool TextureFormatsEqual(ITexture texture1, ITexture texture2)
        {
            if (texture1 != null)
                return texture1.FormatsEqual(texture2);
            return false;
        }
    }
}
